package com.cbry.easyddl.main;

import com.cbry.easyddl.gui.CsvWindow;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.ContentFactory;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

/**
 * @author cbry
 * @version 1.0.0
 * @ClassName Right2
 * @createTime 2024年05月01日 23:14:20
 */
public class SettingDemo implements ToolWindowFactory {
    private CsvWindow csvWindow = new CsvWindow();
    private JComponent jComponent;

    public SettingDemo() {
        jComponent = csvWindow.getMainPanel();
    }

    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        toolWindow.getContentManager().addContent(
                ContentFactory.getInstance().createContent(jComponent, "", false)
        );
    }
}
